#pragma GCC optimize(2, "Ofast", "inline")
#include <iostream>
#include <vector>
#include <map>
#include <cmath>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>
#include <algorithm>
#define endl '\n'
#define int long long
#define pii pair<int, int>
using namespace std;

// 已1
vector<int> a(4);

// 未知
string s = "+-*/";


int getPriority(int op)
{
    return op >= 2 ? 2 : 1; // 乘除优先级2，加减优先级1
}

bool compute(stack<int>& nums, stack<int>& op)
{
    int t = op.top(); op.pop();
    int b = nums.top(); nums.pop();
    int a = nums.top(); nums.pop();
    if (t == 0)  nums.push(a + b);
    else if (t == 1) nums.push(a - b);
    else if (t == 2) nums.push(a * b);
    else
    {
        if (b == 0 || a % b != 0) return false;
        nums.push(a / b);
    }
    return true;
}

bool check(vector<int> ops) {
    stack<int> nums;
    stack<int> op;
    nums.push(a[0]);
    for (int i = 0; i < 3; ++i)
    {
        int curr = ops[i];
        while (!op.empty() && getPriority(op.top()) >= getPriority(curr))
        {
            if (!compute(nums, op)) return false;
        }
        nums.push(a[i + 1]);
        op.push(curr);
    }
    while (!op.empty())
    {
        if (!compute(nums, op)) return false;
    }
    return nums.size() == 1 && nums.top() == 24;
}


signed main()
{
    cin.tie(0)->sync_with_stdio(0);
    cin >> a[0] >> a[1] >> a[2] >> a[3];
    sort(a.begin(), a.end()); // 必须先排列，不然生成的排列不全，生成的排列字典序要比当前的大的
    do
    {
        for (int i = 0;i < 4;++i)
        {
            for (int j = 0;j < 4;++j)
            {
                for (int k = 0;k < 4;++k)
                {
                    if (check({ i,j,k }))
                    {
                        cout << a[0] << s[i] << a[1] << s[j] << a[2] << s[k] << a[3] << endl;
                        return 0;
                    }
                }
            }
        }
    } while (next_permutation(a.begin(), a.end()));
    return 0;
}